// Call the vehicle return function on the server

private ["_player","_vehicle","_playerUID","_owner","_type","_points"];
_player = _this select 1;
_vehicle = _this select 0;
_playerUID = getPlayerUID _player;
_owner = _vehicle getVariable ["owner", nil];
_type = toUpper (typeOf _vehicle);

if (_playerUID == _owner) then {
	switch (_type) do {
		case "B_HELI_LIGHT_01_ARMED_F" : { _points = 15 };
		case "B_HELI_ATTACK_01_F" : { _points = 50 };
		case "I_PLANE_FIGHTER_03_CAS_F" : { _points = 75 };
		case "B_PLANE_CAS_01_F" : { _points = 150 };
	};
	_nil = [[player, _vehicle], "SXP_fnc_vehicleReturn", false] call BIS_fnc_MP;
	systemChat format ["You have gained %1 points for returning your vehicle", _points];
} else {
	systemChat "You cannot return a vehicle that you do not own!";
};